 <!-- 组局列表 -->
 <script lang="ts">
 export default {
   name: "yybureauFormation",
 };
 </script>
 <template>
   <div class="page-box h100 display-flex czbj">
     <p class="title-label mb10">
      组局列表
     </p>
     <div>
       <dxtable :headBtn="headBtn" :dataJson="dataJson" :portUrl="portUrl" :qx="qx" ref="databale"
         sonRouter="yybureauFormationBJ"></dxtable>
     </div>
   </div>
   <n-modal v-model:show="showModal" preset="card" class="dsfsdrewrewe" >
     <template #header>
       <div>浏览二维码</div>
     </template>
     <div>
       <img :src="qcosertt" class="fsdfereertr">
     </div>
     <template #action>
       <div class="tr">
         <n-button @click="showModal=false"> 关闭 </n-button>
       </div>
     </template>
   </n-modal>
 </template>
 <script lang='ts' setup>
 import dxtable from "../../components/util/dxtable.vue";
 import sort from "../../components/util/sort.vue";
 import { dxget, dxpost, qurl, hf } from "../../util/index";
 import { h, ref, reactive, onBeforeUpdate } from "vue";
 const props = defineProps({
   pup: { type: String },
 });
 const showModal = ref(false)
 const qcosertt = ref()
 let portUrl = "yuyue/bureauFormation";
 let headBtn = [];
 const zdList = ref()
 const databale = ref();
 const videourl = ref()
 const typeli = ref([])
 const initeer = () => {
   databale.value.initDataExpose();
 };
 const emit = defineEmits(["callBack"]);
 // 弹窗公用该列表
 let dataJson = reactive([
   {
     title: "id",
     key: "id",
     width: 50,
   },
 
   {
     title: "活动名称",
     search: true, // 是否在搜索栏展示
     key: "title",
     width: 400,
   },  {
     title: "场地",
     search: true, // 是否在搜索栏展示
     key: "site",
   },{
     title: "主题",
     search: true, // 是否在搜索栏展示
     key: "theme",
   },{
     title: "活动地址",
     search: true, // 是否在搜索栏展示
     key: "Locations",
   },{
     title: "活动分类",
     search: true, // 是否在搜索栏展示
     type:"select",
     options:[],
     key: "classify",
     render:(row)=>{
     try{
      return typeli.value.filter(a=>a.value==row.classify)[0].label
     }catch(e){
      return '--'
     }
      
     }
   },
   
 
   {
     title: "排序",
     width: 100,
     render(row) {
       row.databaseName = "yybureauFormation";
       return h(sort, {
         row,
         onCallBack: () => {
           initeer();
         },
       });
     },
   },
   {
     title: "添加时间",
     key: "addTime",
     width: "140",
     type: "daterange",
   },
 ]);
 
 const qx = {
   DeletePermissionID: "yybureauFormationdel", //删除
   EditPermissionIdentifier: "yybureauFormationbj", // 编辑
   NewPermissionIdentifier: "yybureauFormationxz", // 新建
   ViewPermissionID: "yybureauFormationck", // 查看
 };
 const getcasetype = async () => {
   const { data }: any = await dxget("dxgjAdmin/getzd", { name: 'yyzjfl' })
 
   dataJson[5].options = [
     {
       label: "全部",
       value: ""
     },
     ...data
   ]
   typeli.value = data
   // ishjwoer.value = true
 }
 getcasetype()
 
 </script>
 <style scoped>
 .fsdfereertr{
   width: 100%;
   height: 360px;
 }
 </style>
   
   
   